package com.amigo.online.provider.manager.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.amigo.online.common.core.mybatis.MyMapper;
import com.amigo.online.provider.manager.model.entity.FollowTbl;
import com.amigo.online.provider.manager.model.entity.User;

@Mapper
@Component
public interface UserMapper extends MyMapper<User> {

    /**
     * 查询用户 条件查询
     *
     * @param dto
     * @return
     */
    public List<User> findUserList(User user);

    /**
     * 查询账号是否存在
     *
     * @param account
     * @return
     */
    public List<User> selectAccount(String account);

    public Integer insertionUser(User user);

    public Integer updateUser(User user);

    /**
     * 查询用户token
     *
     * @param id
     * @return
     */
    public String selectToken(Long id);

    /**
     * 查询好友
     *
     * @param followTbl
     * @ @return
     */
    List<User> findFriendUser(@Param("list") List<FollowTbl> list);

    /**
     * 修改用户类别
     *
     * @param user
     * @return
     */
    Integer updateType(User user);


}
